import os
from openpyxl import load_workbook 
import shutil

xls_name = "20241230参数报文.xlsx"

def excel_files():
    wb = load_workbook(xls_name)
    sheets = wb.worksheets
    print(sheets)

    sheet1 = sheets[0]
    print(sheet1[1])

    rows = sheet1.rows
    for row in rows:
        row_val = [col.value for col in row]
        if row_val[1] == '4002':
            print(row_val[1],'车站设备',row_val[3][52:60],'前版本号',row_val[3][64:72],int(row_val[3][64:72],16),'后版本号',row_val[3][72:80],int(row_val[3][72:80],16))


excel_files()

        
